package com.wxyzz.satserver.loopImg.controller;

import com.wxyzz.common.core.annotation.NoLoginCheck;
import com.wxyzz.common.core.common.R;
import com.wxyzz.common.core.entity.LoopImg;
import com.wxyzz.satserver.loopImg.service.LoopImgService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * --- 加油，努力 ---
 *
 * @Author XYP
 * @Date 2024/11/21
 * @Solgne 从想做到能做
 * @Desc
 */
@RestController
@RequestMapping("/loop")
@Api(tags ="轮播图api")
@CrossOrigin
public class LoopImgController {

    @Resource
    private LoopImgService loopImgService;

    @GetMapping("/getLoopImg")
    @NoLoginCheck
    @ApiOperation(value = "获取轮播图")
    public R getLoopImg() {
        List<LoopImg> loopImgs = loopImgService.selectLoopImg();
        return R.ok(loopImgs);
    }
}
